package src.lib;

import java.util.Map;
import java.util.HashMap;

public class Table {
	public static Map<String, String> encoding = new HashMap<>();
	public static Map<String, String> decoding = new HashMap<>();
	static {
		encoding.put("0", "11111");
		encoding.put("1", "01111");
		encoding.put("2", "00111");
		encoding.put("3", "00011");
		encoding.put("4", "00001");
		encoding.put("5", "00000");
		encoding.put("6", "10000");
		encoding.put("7", "11000");
		encoding.put("8", "11100");
		encoding.put("9", "11110");
		encoding.put("A", "01");
		encoding.put("B", "1000");
		encoding.put("C", "1010");
		encoding.put("D", "100");
		encoding.put("E", "0");
		encoding.put("F", "0010");
		encoding.put("G", "110");
		encoding.put("H", "0000");
		encoding.put("I", "00");
		encoding.put("J", "0111");
		encoding.put("K", "101");
		encoding.put("L", "0100");
		encoding.put("M", "11");
		encoding.put("N", "10");
		encoding.put("O", "111");
		encoding.put("P", "0110");
		encoding.put("Q", "1101");
		encoding.put("R", "010");
		encoding.put("S", "000");
		encoding.put("T", "1");
		encoding.put("U", "001");
		encoding.put("V", "0001");
		encoding.put("W", "011");
		encoding.put("X", "1001");
		encoding.put("Y", "1011");
		encoding.put("Z", "1100");
		encoding.put(".", "010101");
		encoding.put(",", "110011");
		encoding.put("?", "001100");
		encoding.put("'", "011110");
		encoding.put("!", "101011");
		encoding.put("/", "10010");
		encoding.put("(", "10110");
		encoding.put(");", "101101");
		encoding.put("&", "01000");
		encoding.put(",", "111000");
		encoding.put(";", "101010");
		encoding.put("=", "10001");
		encoding.put("+", "01010");
		encoding.put("-", "100001");
		encoding.put("_", "001101");
		encoding.put("\"", "010010");
		encoding.put("$", "0001001");
		encoding.put("@", "011010");

		for (Map.Entry<String, String> e : encoding.entrySet()) {
			String key = e.getKey();
			String value = e.getValue();

			decoding.put(value, key);
		}
	}
}

